package suites.integration {
	import org.flexunit.asserts.assertNotNull;
	import org.splink.library.queue.QEvent;
	import org.splink.resource.IResourceProvider;
	import org.splink.resource.ResourceProvider;

	/**
	 * @author Max Kugland
	 */
	public class CompleteTest extends AbstractIntegrationTest {
		
		[Test (async)]
		public function test() :void {
			handleAsync(24000);
			
			var xml : XML = <resourcebundles defaultLocale="de_DE">
								<resourcebundle locale="de_DE">
									<assets path="../sample/assets/">
										<asset id="sample" src="assets.swf" filesize="16383" />
									</assets>
									<fonts path="../sample/fonts/">
										<font id="Arial" type="text" src="arial.swf" filesize="21858" />
										<font id="Verdana" type="system" isSystemFont="true" filesize="0" />
									</fonts>
								</resourcebundle>
								<libraries path="../sample/library/">
									<library id="test" src="testlibrary.swf" filesize="1307" />
								</libraries>
							</resourcebundles>;
							
			createProcessor(xml, function(e : QEvent) : void {
				var p : IResourceProvider = ResourceProvider.instance();
				
				assertNotNull(p.getAssetById("SplinkAsset"));
				FontTest.assertProvider(p);
				assertNotNull(new TestLibrary().test());
			}).start();
		}
	}
}
